package org.jeecg.modules.job.rms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.job.rms.entity.RmsOuttask;
import org.jeecg.modules.job.rms.mapper.RmsOuttaskMapper;
import org.jeecg.modules.job.rms.service.IRmsOuttaskService;
import org.jeecg.modules.job.ums.entity.UmsCommunicate;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 任务列表
 * @Author: jeecg-boot
 * @Date:   2022-12-18
 * @Version: V1.0
 */
@Service
public class RmsOuttaskServiceImpl extends ServiceImpl<RmsOuttaskMapper, RmsOuttask> implements IRmsOuttaskService {

    @Override
    public boolean addOrUpdate(RmsOuttask param) {
        if (oConvertUtils.isNotEmpty(param.getId())){
            return this.updateById(param);
        }else{
            return this.save(param);
        }
    }

    @Override
    public IPage<RmsOuttask> findPageBySpec(Page<RmsOuttask> page, RmsOuttask param) {
        return this.baseMapper.getTaskPageList(page,param);
    }
}
